<extend name="_top"/>


<block name="body">
<div class="aw-register-box">
	<h1>找回密码</h1>
	<h2>在这里找到最初的你自己</h2>
	<div class="mod-body">
        <form class="login-form" id="J_findpwd_form" action="{:U('Member/mi')}" method="post">
			<ul>
				<li>
					<input type="text" id="inputEmail" class="form-control" placeholder="{:L('_MI_EMAIL_PLACEHOLDER_')}"
                               ajaxurl="/member/checkUserEmailUnique.html" errormsg="{:L('_MI_EMAIL_ERROR_')}" nullmsg="{:L('_MI_EMAIL_')}"
                               datatype="e" value="" name="email">
				</li>
				<li>
					<div class="col-xs-5" style="padding: 0px;">
						<input type="text" id="inputPassword" class="form-control" placeholder="{:L('_MI_CODE_')}" errormsg="{:L('_MI_CODE_ERROR_')}" nullmsg="{:L('_MI_CODE_NULL_')}" datatype="*5-5" name="verify">
					</div>
					<div class="col-xs-7 "style="padding: 0px;">
						<img class="verifyimg reloadverify pull-right" alt="{:L('_MI_ALT_')}" src="{:U('verify')}" style="cursor:pointer;height: 40px;">
					</div>
					<div class="controls Validform_checktip text-warning"></div>
					<div class="clearfix">
						
					</div>
				</li>
                <li class="last">
					<button class="btn btn-large btn-primary" type="submit" style="width: 320px;">找回密码</button>
				</li>
			</ul>
        </form>
	</div>
	<div class="mod-footer">
		<ul id="reg_nav">
			<li style="padding-left:20px;"><a href="{:U('Member/login')}">返回登陆</a></li>
			<li>|</li>
			<php>if(check_reg_type('mobile')){</php>
			<li><a href="{:U('Member/mimobile')}">手机密码找回</a></li>
			<php>}</php>
		</ul>
	</div>
</div>
</block>


<block name="side"></block>
<block name="script">
    <script type="text/javascript">

        $(document)
                .ajaxStart(function () {
                    $("button:submit").addClass("log-in").attr("disabled", true);
                })
                .ajaxStop(function () {
                    $("button:submit").removeClass("log-in").attr("disabled", false);
                });


        $(function () {
            $("form").submit(function () {
                var self = $(this);
                $.post(self.attr("action"), self.serialize(), success, "json");
                return false;

                function success(data) {
                    handleAjax(data);
                }
            });


            var verifyimg = $(".verifyimg").attr("src");
            $(".reloadverify").click(function () {
                if (verifyimg.indexOf('?') > 0) {
                    $(".verifyimg").attr("src", verifyimg + '&random=' + Math.random());
                } else {
                    $(".verifyimg").attr("src", verifyimg.replace(/\?.*$/, '') + '?' + Math.random());
                }
            });
        });
    </script>
</block>
